package com.amumu.drama.common.modules.order.service;

import com.amumu.drama.common.constant.OperateTypeEnum;
import com.amumu.drama.common.modules.order.dto.req.PrePaymentReq;
import com.amumu.drama.common.modules.order.dto.req.QueryPayStatusReq;
import com.amumu.drama.common.modules.order.dto.resp.PayStatusResp;
import com.amumu.drama.common.modules.order.dto.resp.PrePaymentResp;
import com.amumu.drama.common.modules.service.impl.payment.PaymentReq;
import com.amumu.drama.common.modules.service.impl.payment.PaymentResp;
import com.amumu.drama.model.UmsMember;

import java.util.Map;

;

public interface PaymentService {
    /** 创建预支付订单 */
    PrePaymentResp prePayment(PrePaymentReq request);


    /** 支付 */
    PaymentResp pay(UmsMember umsMember, PaymentReq paymentReq);

    /** 支付回调 */
    Object payNotify(String payHandlerType, Map<String, String> params, String body);

    /** 轮询查询订单支付状态 */
    PayStatusResp queryPayStatus(QueryPayStatusReq request, OperateTypeEnum operateTypeEnum, Long operatorId);

    /** 退款申请 */
    PaymentResp refundApply(PaymentReq request, OperateTypeEnum operateTypeEnum, Long operatorId);

    /** 退款回调通知 */
    Object refundNotify(String payHandlerType, Map<String, String> params, String body);

    /** 轮询查询退款订单状态 */
    PaymentResp queryRefundStatus(QueryPayStatusReq request, OperateTypeEnum operateTypeEnum, Long operatorId);


}
